//
//  HGTwoCollectionViewCell.m
//  悦享
//
//  Created by dllo on 16/3/18.
//  Copyright © 2016年 张洪国. All rights reserved.
//

#import "HGTwoCollectionViewCell.h"
#import <UIImageView+WebCache.h>
@implementation HGTwoCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.imageView1 = [[UIImageView alloc] init];
        [self.contentView addSubview:_imageView1];
        
        self.label1 = [[UILabel alloc] init];
        [self.contentView addSubview:_label1];
    }
    return self;
}

- (void)setModel:(TVModel *)model{
    _model = model;
    [_imageView1 sd_setImageWithURL:[NSURL URLWithString:_model.picUrl] placeholderImage:[UIImage imageNamed:PLACE_HLODER]];
    
    _label1.text = _model.name;
    
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes{
    
    _imageView1.frame = CGRectMake(10, 0, 50, layoutAttributes.size.height);
    _label1.frame = CGRectMake(70, 0, SREEN_WIDTH - 60, 40);
    _label1.font = [UIFont systemFontOfSize:15];
    
}

@end
